package com.sunfield.baseframe.view;

import android.app.Dialog;
import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;

import com.sunfield.baseframe.R;

/**
 * Created by wangxl on 2016/11/5.
 */
public class LoadingDialog extends Dialog {
    WinLoadingView win_loading;
    public LoadingDialog(Context context) {
        super(context, R.style.MyLoadingDialog);
        View mView = LayoutInflater.from(context).inflate(R.layout.dialog_loading, null);
        win_loading = (WinLoadingView) mView.findViewById(R.id.win_loading);
        setContentView(mView);
    }

    @Override
    protected void onStart() {
        super.onStart();
        win_loading.startAnimator();
    }

    @Override
    protected void onStop() {
        win_loading.stopAnimator();
        super.onStop();
    }
}
